class CreatePageElements < ActiveRecord::Migration
  def self.up
    create_table :page_elements do |t|
      t.column :page_id, :integer, :null => false
      t.column :content_id, :integer, :null => false
      t.column :area_name, :string
      t.column :position, :integer
    end
    add_index :page_elements, :area_name
    add_index :page_elements, :position
  end

  def self.down
#    remove_index :page_elements
    drop_table :page_elements
  end
end
